import {IUIForm} from "../../src/UI/IUIForm";

export default class UIForm extends cc.Component implements IUIForm{


    get UIFormAssetName(): string {
        return this._UIFormAssetName;
    }

    set UIFormAssetName(value: string) {
        this._UIFormAssetName = value;
    }
    get SerialId(): number {
        return this._SerialId;
    }

    set SerialId(value: number) {
        this._SerialId = value;
    }
    get Depth(): number {
        return this._Depth;
    }

    set Depth(value: number) {
        this._Depth = value;
    }
    private _Depth: number;
    private _SerialId: number;
    private _UIFormAssetName: string;



    OnClose(isShutdown: boolean, userdata?): void {
        let action = cc.fadeOut(0.2);
        this.node.runAction(action);
    }

    OnDepthChanged(depth: number): void {

    }

    OnInit(serialId: number, uiFormAssetName: string, userData?): void {



    }

    OnOpen(userdata?): void {
        let action = cc.fadeIn(0.2);
        this.node.runAction(action);
    }

    OnUpdate(elapseSeconds: number, realElapseSeconds: number): void {

    }

}